<%@ page language="java" pageEncoding="utf-8"%>
<%@ page import="java.util.*" %>
<%@ page isELIgnored="false" %> 

<%@ page import="net.ssta.core.db.RecordSet"%>
<%@ page import="net.ssta.core.db.Record"%>
<%@ page import="net.ssta.core.web.RequestKit"%>
<%@ page import="net.ssta.core.db.PagingInfo"%>
<%@ page import="orest.front.achieve.AchieveHandler"%>

<%
	String path = request.getContextPath();
	String infotype = (String)request.getAttribute("infotype");
	String infoclass = (String)request.getAttribute("infoclass");
	String publishdate = (String)request.getAttribute("publishdate");
	RecordSet recordSet = (RecordSet)request.getAttribute("resultSet");
	PagingInfo paginginfo = (PagingInfo)request.getAttribute("pagingInfo");

	System.out.println(recordSet.size());
	RecordSet selinfoclass = AchieveHandler.getNewEnergyClassList();
	
	Record record = null;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
    <TITLE>技术市场-国家安科网</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=utf-8">
    <META http-equiv=x-ua-compatible content=ie=7>
    <META content="MSHTML 6.00.6000.17107" name=GENERATOR>
    <link href="<%=path%>/common/css/layout.css" rel="stylesheet" type="text/css" />
	<link href="<%=path%>/common/css/user.css" rel="stylesheet" type="text/css" />
    <LINK href="<%=path%>/includes/Fvalidate/style.css" type=text/css rel=stylesheet>
    <script type="text/javascript" src="<%=path%>/includes/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="<%=path%>/includes/styleBase/js/jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/includes/KindEditor/kindeditor.js"></script>    
    <script type="text/javascript" src="<%=path%>/includes/Fvalidate/Fvalidate.js"></script>

    <SCRIPT>  
	
		
	//自荐项目
	function load_recommendzjxm(divid,http){
		$.ajax({
			type:"POST",
			url:http,
			error:function(msg)
			{
				//alert("操作失败，请重试！"+msg);
			},
		    success:function(data)
		    {
		    	var data = eval("("+data+")");
				var html="";
				for(var i=0;i<data.length&&i<3;i++){
					html+="<li><a href=\"#2012\" onclick=\"viewSelloneself('"+data[i]['id']+"')\">【自荐项目】";
					html+=data[i]['title'];
					html+="</a><li>";
				}
				$("#"+divid).html(html);
			}
		});
	}
	//技术需求
	function load_recommendjsxq(divid,http){
		$.ajax({
			type:"POST",
			url:http,
			error:function(msg)
			{
				//alert("操作失败，请重试！"+msg);
			},
		    success:function(data)
		    {
		    	var data = eval("("+data+")");
				var html="";
				for(var i=0;i<data.length&&i<3;i++){
					html+="<li><a href=\"#2012\" onclick=\"viewTechneed('"+data[i]['id']+"')\">【技术需求】";
					html+=data[i]['title'];
					html+="</a><li>";
				}
				$("#"+divid).html(html);
			}
		});
	}
	//推荐投融资项目
	function load_recommendtrzxm(divid,http){
		$.ajax({
			type:"POST",
			url:http,
			error:function(msg)
			{
				//alert("操作失败，请重试！"+msg);
			},
		    success:function(data)
		    {
		    	var data = eval("("+data+")");
				var html="";
				for(var i=0;i<data.length&&i<3;i++){
					html+="<li><a href=\"#2012\" onclick=\"viewInvest('"+data[i]['id']+"')\">【投融资项目】";
					html+=data[i]['title'];
					html+="</a><li>";
				}
				$("#"+divid).html(html);
			}
		});
	}
	
		
	$(function()
	{
	//推荐技术需求
        var http = "<%=path%>/market?method=techneedRecommendShow";
		load_recommendjsxq("tjjsxq",http);
		
	//推荐自荐项目
        var http = "<%=path%>/market?method=selloneselfRecommendShow";
		load_recommendzjxm("tjzjxm",http);
		
	//推荐投融资项目
        var http = "<%=path%>/market?method=investRecommendShow";
		load_recommendtrzxm("tjtrzxm",http);
	});

    function viewTechneed(uuid)
	{
	 	window.open("<%=path%>/market?method=techneedInfoView&uuid="+uuid);;
	} 
	function viewSelloneself(uuid)
	{
	 	window.open("<%=path%>/market?method=selloneselfInfoView&uuid="+uuid);
	} 
	function viewInvest(uuid)
	{
	 	window.open("<%=path%>/market?method=investInfoView&uuid="+uuid);
	} 
	
	function _marketsearch(){
		document.marketsearch.action="<%=path%>/market";
		document.marketsearch.submit();
	}
	
    </SCRIPT>  
</HEAD>

<BODY>
 
<%@include file="../common/toplogin.jsp"%>    
<%@include file="../common/topbanner.jsp"%> 
<%@include file="../common/topmenu.jsp"%> 
 
<div id="contentmain">

	<div id="all_content_left">
	    <%@include file="marketleft.jsp"%> 
        <div id="border_box">
		    <div id="ind_title_orange"><font>特别</font><span>推介</span></div>
			<ul id="tjjsxq" class="ArticleTitleList">
				<li><a href="#"></a></li>
			</ul>
            <ul id="tjzjxm" class="ArticleTitleList">
				<li><a href="#"></a></li>
			</ul>
            <ul id="tjtrzxm" class="ArticleTitleList">
				<li><a href="#"></a></li>
			</ul>
		</div>
        
	</div>
    
    <!--div id="content_right"-->
    <div id="content_right">
    	<div id="topsearchbox">
		    <form action="" method="post" name="marketsearch">
            	<input type="hidden" name="method" id="method" value="marketSearch">
				<ul>
					<li><img src="<%=path%>/common/images/search/icon.gif" /></li>
					<li><span class="bluetitle"></span></li>
					<li>信息类别：
                    <select id="infotype" name="infotype">
                    	<option value="1" <%if("1".equals(infotype)){%>selected<%}%>>技术需求</option>
                        <option value="2" <%if("2".equals(infotype)){%>selected<%}%>>自荐项目</option>
                        <option value="3" <%if("3".equals(infotype)){%>selected<%}%>>投融资项目</option>
                    </select>
                    所属分类
                    <select id="infoclass" name="infoclass">
                    	<option value="">全部</option>
                    <%
					for(int i=0;i<selinfoclass.size();i++){
						Record ecRecord = selinfoclass.get(i);
					%>
                    	<option  <%if(ecRecord.getString("OPTIONVALUE","").trim().equals(infoclass)){%>selected<%}%> value="<%=ecRecord.getString("OPTIONVALUE","").trim()%>"><%=ecRecord.getString("OPTIONNAME","")%></option>
                    <%
					}
					%>
                    </select>
                    发布时间
                    <select id="publishdate" name="publishdate">
                    	<option value="0">全部</option>
                        <option value="1" <%if("1".equals(publishdate)){%>selected<%}%>>一周</option>
                        <option value="2" <%if("2".equals(publishdate)){%>selected<%}%>>一个月</option>
                        <option value="3" <%if("3".equals(publishdate)){%>selected<%}%>>三个月</option>
                        <option value="4" <%if("4".equals(publishdate)){%>selected<%}%>>半年</option>
                        <option value="5" <%if("5".equals(publishdate)){%>selected<%}%>>一年</option>
                    </select>
                    </li>
					<li><img onClick="javascript:_marketsearch();" src="<%=path%>/common/images/search/botton1.gif" style="margin-top:2px;"/></li>
				</ul>
			</form>
		</div>
    	<div id="topsearchbox">
		    <div id="top_nav_search_left">&nbsp;&nbsp;当前位置：<a href="/cms" style="color:#0071bc;">首页</a> > <a href="<%=path%>/market/marketindex.jsp" style="color:#0071bc;">技术市场</a> > 搜索结果</div>
		</div>
        
        <%
		if("1".equals(infotype)){
		%>
      	<div id="border_box">
        	<div id="ind_title_orange"><font>技术需求</font><span></span></div>
            <table boder=0 cellpadding="0" cellspacing="0" width="99%" align="center">
            	<TR><TD height="30">标题</TD><td>发布时间</td><td>联系人</td></TR>
                <%
				if(recordSet!=null){
					for(int i=0;i<recordSet.size();i++){
						record = recordSet.get(i);
				%>
                <tr>
                	<td height="30" align="left">&nbsp;&nbsp;&nbsp;<A href="<%=path%>/market?method=techneedInfoView&uuid=<%=record.getString("ID","")%>" target="_blank"><%=record.getString("TITLE","")%></A></td>
                    <TD><%=record.getString("SUBMITDATE","")%></TD>
                    <td><%=record.getString("LINKMAN","")%></td>
                </tr>
                <%
					}
				}
				%>
            </table>
            
	 	</div>
        <div  class="navRightDiv">
            <jsp:include flush="true" page="/common/paging.jsp"></jsp:include>
        </div>
        <%
		}else if("2".equals(infotype)){
		%>
      	<div id="border_box">
		    <div id="ind_title_orange"><font>自荐项目</font><span></span></div>
            <table boder=0 cellpadding="0" cellspacing="0" width="99%" align="center">
            	<TR><TD height="30">标题</TD><td>发布时间</td><td>联系人</td></TR>
                <%
				if(recordSet!=null){
					for(int i=0;i<recordSet.size();i++){
						record = recordSet.get(i);
				%>
                <tr>
                	<td height="30" align="left">&nbsp;&nbsp;&nbsp;<A href="<%=path%>/market?method=selloneselfInfoView&uuid=<%=record.getString("ID","")%>" target="_blank"><%=record.getString("TITLE","")%></A></td>
                    <TD><%=record.getString("SUBMITDATE","")%></TD>
                    <td><%=record.getString("LINKMAN","")%></td>                    
                </tr>
                <%
					}
				}
				%>
            </table>
	 	</div>
        <div  class="navRightDiv">
            <jsp:include flush="true" page="/common/paging.jsp"></jsp:include>
        </div>
        <%
		}else{
		%>
        <div id="border_box">
		    <div id="ind_title_orange"><font>投融资项目</font><span></span></div>
            <table boder=0 cellpadding="0" cellspacing="0" width="99%" align="center">
            	<TR><TD height="30">标题</TD><td>发布时间</td><td>联系人</td></TR>
                <%
				if(recordSet!=null){
					for(int i=0;i<recordSet.size();i++){
						record = recordSet.get(i);
				%>
                <tr>
                	<td height="30" align="left">&nbsp;&nbsp;&nbsp;<A href="<%=path%>/market?method=investInfoView&uuid=<%=record.getString("ID","")%>" target="_blank"><%=record.getString("TITLE","")%></A></td>
                    <TD><%=record.getString("SUBMITDATE","")%></TD>
                    <td><%=record.getString("LINKMAN","")%></td>                    
                </tr>
                <%
					}
				}
				%>
            </table>
	 	</div>
        <div  class="navRightDiv">
            <jsp:include flush="true" page="/common/paging.jsp"></jsp:include>
        </div>
        <%
		}
		%>
    </div>
</div>
    
<%@include file="../../common/bottom.jsp"%>    

</BODY>
</HTML>
